package com.ty.day6;

import java.io.*;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/29 10:40
 */
public class BufferStreamDemo01 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("E:\\文件夹\\java\\1\\2.txt");
        BufferedInputStream bif = new BufferedInputStream(fis);
        byte[] bytes = new byte[9];
        bif.read(bytes);
        System.out.println(new String(bytes));
        bif.close();
        fis.close();
        FileOutputStream fos = new FileOutputStream("E:\\文件夹\\java\\1\\2.txt");
        BufferedOutputStream bos = new BufferedOutputStream(fos);
        bos.write("我是吉儿阳".getBytes());
        bos.flush();
        bos.close();
        fos.close();
    }

}
